//
// Created by zhouyi on 2019/11/12.
//

#include "CppDemo01.h"

void objCppDemo01() {
    CppDemo01 cppDemo01;
    cppDemo01.name = (char *) "周杰伦";

    cppDemo01.printAge();
    cppDemo01.printName();
}

int main(int argc, char *argv[]) {
    objCppDemo01();

    //
    CppDemo01 cppDemo01(19);
    cppDemo01.printAge();
    printf("%p\n",&cppDemo01);


    CppDemo01 cppDemo02 = (129);
    cppDemo02.printAge();
    printf("%p\n",&cppDemo02);

    CppDemo01 cppDemo03 = CppDemo01(189);
    cppDemo03.printAge();
    printf("%p\n",&cppDemo03);

    CppDemo01 cppDemo04 = CppDemo01(200);
    cppDemo04.printAge();
    printf("%p\n",&cppDemo04);

    CppDemo01 cppDemo05 = cppDemo04;
    cppDemo05.printAge();
    printf("%p\n",&cppDemo05);


    return 0;
}